/*
  This ESP8266 Project based on:
  https://github.com/tzapu/WiFiManager
*/
#include <avr/pgmspace.h>
#define LED_PIN 4
// comment below line for progressive matrix

// Library that help you connect your WiFi AP on the air
#include <WiFiManager.h>
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#define NUM_LEDS    256    // 灯珠数
#define xres 16            // Total number of  columns in the display
#define yres 16            // Total number of  rows in the display
#define BRIGHTNESS  150    // LED 亮度
#define LED_TYPE    WS2812B
#define COLOR_ORDER GRB

// setup NePixel
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(xres, yres, 1, 1, LED_PIN,
                            NEO_MATRIX_TOP  + NEO_TILE_LEFT  + NEO_MATRIX_COLUMNS   + NEO_MATRIX_PROGRESSIVE +
                            NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG,
                            NEO_GRB + NEO_KHZ800);


void setup() {
    Serial.begin(115200);
    matrix.begin();
    matrix.setTextWrap(false);
    matrix.setBrightness(70);
    matrix.show(); // This sends the updated pixel color to the hardware.

}

unsigned long last_10sec = 0;
unsigned int counter = 0;

const uint8_t pikachu1[] PROGMEM = {0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,232,232,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,255,242,0,20,20,20,20,20,20,20,20,20,255,242,0,255,242,0,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,232,232,232,232,232,232,232,232,232,232,232,232,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,255,242,0,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,255,0,0,255,0,0,255,0,0,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,20,20,20,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,232,232,232,232,232,232,20,20,20,232,232,232,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,232,232,232,232,232,232,20,20,20,232,232,232,232,232,232,20,20,20,232,232,232,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,255,242,0,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,255,242,0,20,20,20,255,242,0,255,242,0,255,242,0,255,0,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,20,20,20,0,0,185,20,20,20,20,20,20,232,232,232,232,232,232,232,232,232,143,12,18,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,45,45,0,20,20,20,45,45,0,45,45,0,45,45,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,0,0,185,0,0,185,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,45,45,0,45,45,0,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,0,0,185,20,20,20,232,232,232,232,232,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,45,45,0,20,20,20,45,45,0,45,45,0,45,45,0,255,242,0,255,242,0,20,20,20,20,20,20,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,0,0,185,20,20,20,232,232,232,232,232,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,45,45,0,45,45,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,255,242,0,255,242,0,255,242,0,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,45,45,0,45,45,0,45,45,0,45,45,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,0,0,0,0,0,0,0,0,0,0,0,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232};
const uint8_t pikachu2[] PROGMEM = {0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,255,242,0,20,20,20,20,20,20,20,20,20,255,242,0,255,242,0,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,255,242,0,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,232,232,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,20,20,20,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,232,232,232,232,232,232,232,232,232,232,232,232,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,255,0,0,255,0,0,255,0,0,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,255,242,0,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,232,232,232,232,232,232,20,20,20,232,232,232,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,20,20,20,20,20,20,255,242,0,255,242,0,255,242,0,255,0,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,232,232,232,232,232,232,20,20,20,232,232,232,232,232,232,20,20,20,232,232,232,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,45,45,0,20,20,20,45,45,0,45,45,0,45,45,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,45,45,0,45,45,0,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,0,0,185,20,20,20,20,20,20,232,232,232,232,232,232,232,232,232,143,12,18,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,45,45,0,20,20,20,45,45,0,45,45,0,45,45,0,255,242,0,255,242,0,20,20,20,20,20,20,255,242,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,0,0,185,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,232,232,232,232,232,232,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,20,20,20,20,20,20,255,242,0,255,242,0,255,242,0,255,242,0,20,20,20,255,242,0,255,242,0,20,20,20,0,162,232,0,162,232,20,20,20,45,45,0,20,20,20,232,232,232,232,232,232,20,20,20,45,45,0,45,45,0,20,20,20,45,45,0,45,45,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,255,242,0,255,242,0,20,20,20,20,20,20,20,20,20,20,20,20,0,162,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,20,20,20,45,45,0,45,45,0,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,45,45,0,45,45,0,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,20,20,20,20,20,20,20,20,20,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232,0,162,232};

int z = 0;//平移坐标
int zres = 62;//动画像素长度(高度默认与yres一致)
int rate = 200;
void loop() {
    for (uint8_t y = 0; y < yres; y++) {
        for (uint8_t x = 0; x < xres; x++) {
            uint8_t r = pgm_read_dword(&(pikachu2[y*zres*3+(x+zres-xres-z)*3]));
            uint8_t g = pgm_read_dword(&(pikachu2[y*zres*3+(x+zres-xres-z)*3+1]));
            uint8_t b = pgm_read_dword(&(pikachu2[y*zres*3+(x+zres-xres-z)*3+2]));
            matrix.drawPixel(x,y,matrix.Color(r,g,b));
        }
    }
    matrix.show();
    delay(rate);
    z = (z+1)%(zres-xres);
    for (uint8_t y = 0; y < yres; y++) {
        for (uint8_t x = 0; x < xres; x++) {
            uint8_t r = pgm_read_dword(&(pikachu1[y*zres*3+(x+zres-xres-z)*3]));
            uint8_t g = pgm_read_dword(&(pikachu1[y*zres*3+(x+zres-xres-z)*3+1]));
            uint8_t b = pgm_read_dword(&(pikachu1[y*zres*3+(x+zres-xres-z)*3+2]));
            matrix.drawPixel(x,y,matrix.Color(r,g,b));
        }
    }
    matrix.show();
    delay(rate);
    z = (z+1)%(zres-xres);
}
